home *** CD-ROM | disk | FTP | other *** search
- property ancestor
- global frameLimit, currentFrame, dirtyFlag
-
- on birth me
- set the ancestor of me to birth(script "recordMethods parent")
- return me
- end
-
- on record me
- buildFilterList(me)
- set countSoundFXData to count(soundFXData)
- if countSoundFXData < currentFrame then
- repeat with theFrameCounter = countSoundFXData + 1 to currentFrame
- append(soundFXData, copyList([EMPTY, 0]))
- end repeat
- end if
- set theSoundName to getAt(curClipRecord, 2)
- set theSoundCastNum to getAt(curClipRecord, 3)
- preLoadCast(theSoundCastNum)
- set overFlow to 0
- if currentFrame < frameLimit then
- if currentFrame > count(scoreData) then
- setAt(scoreData, currentFrame, copyList(autoHoldFrame))
- end if
- setAt(soundFXData, currentFrame, copyList([EMPTY, 0]))
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, 0)
- incrementFrame()
- else
- set overFlow to 1
- end if
- if theSoundCastNum > 16000 then
- set numberOfSndFrames to (the size of cast theSoundCastNum / 22050.0 * 12.0) + 10
- else
- set numberOfSndFrames to (the size of cast theSoundCastNum / 11025.0 * 12.0) + 10
- end if
- puppetSound(2, theSoundCastNum)
- repeat with i = 1 to numberOfSndFrames
- if currentFrame < frameLimit then
- startTimer()
- if currentFrame > count(scoreData) then
- setAt(scoreData, currentFrame, copyList(autoHoldFrame))
- end if
- setAt(soundFXData, currentFrame, list(theSoundName, theSoundCastNum))
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, 0)
- incrementFrame()
- repeat while the timer < 6
- end repeat
- next repeat
- end if
- set overFlow to 1
- exit repeat
- end repeat
- if currentFrame < frameLimit then
- if currentFrame > count(scoreData) then
- setAt(scoreData, currentFrame, copyList(autoHoldFrame))
- end if
- setAt(soundFXData, currentFrame, copyList([EMPTY, 0]))
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, 0)
- incrementFrame()
- else
- set overFlow to 1
- end if
- if overFlow then
- showOverFlowDialog(me)
- end if
- extendClips(me)
- if currentFrame > 1 then
- decrementFrame()
- end if
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, 0)
- set dirtyFlag to 1
- updateTheBrain(appMgr)
- cursor(-1)
- end
-